package edu.uis.project.frankszoo.model.event;

import java.util.EventObject;

/**
 * This class extends the EventObject and represents the PlayerOutOfCardsEvent
 * 
 */
public class PlayerOutOfCardsEvent extends EventObject {

	private static final long serialVersionUID = 7615050263937315261L;
	
	String playerID; // ID of the player out of cards
	Integer handNo;// Serial No of the hand
	Integer activePlayerCount; // No of players still left in the game

	/**
	 * This is the constructor for PlayerOutOfCardsEvent
	 * 
	 * @param source
	 *            component that originated the event
	 * @param playerID
	 *            ID of the player out of cards
	 * @param handNo
	 *            Serial No of the hand
	 * @param activePlayerCount
	 *            No of players still left in the game
	 */
	public PlayerOutOfCardsEvent(Object source, String playerID, Integer handNo, Integer activePlayerCount) {
		super(source);
		this.playerID = playerID;
		this.handNo = handNo;
		this.activePlayerCount = activePlayerCount;
	}

	/**
	 * Returns the ID of the player out of cards
	 * 
	 * @return playerID ID of the player out of cards
	 */
	public String getPlayerID() {
		return playerID;
	}

	/**
	 * Returns the serial no of the hand
	 * 
	 * @return handNo Serial No of the hand
	 */
	public Integer getHandNo() {
		return handNo;
	}

	/**
	 * Returns the no of players still left in the game
	 * 
	 * @return activePlayerCount No of players still left in the game
	 */
	public Integer getActivePlayerCount() {
		return activePlayerCount;
	}

}
